package de.jrk_verwaltung;

import de.jrk_verwaltung.security.login.CLoginController;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.swing.SwingUtilities;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;

public class Main {
    private static final EntityManagerFactory emf = Persistence.createEntityManagerFactory("jrk-verwaltung");
    private final static Logger logger = Logger.getLogger(Main.class);

    /**
     * @param args
     */
    public static void main(String[] args) {
        BasicConfigurator.configure();
        logger.setLevel(Level.DEBUG);
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                logger.debug("Start main programm");
                CLoginController loginController = new CLoginController(emf);
                loginController.showLoginDialog();
            }
        });

    }
}
